package com.hsp.demo_01;

import com.sun.org.apache.bcel.internal.generic.SWITCH;

import java.util.Scanner;

public class Demo_07 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入你的成绩：");
        double score = scanner.nextDouble();
        int i = score >= 60 ? 1 : 0;
        /*switch (i){
            case 0:
                System.out.println("不及格");
                break;
            case 1:
                System.out.println("及格");
                break;
            default:
                System.out.println("输入有误!");
        }*/

        switch((int) score/60){
            case 0:
                System.out.println("不及格");
                break;
            case 1:
                System.out.println("及格");
                break;
            default:
                System.out.println("输入有误!");
        }
    }
}
